home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Camelot
/
Camelot 098 (1990-12)(Swedish User Group of Amiga)(SE)(PD)[WB].zip
/
Camelot 098 (1990-12)(Swedish User Group of Amiga)(SE)(PD)[WB].adf
/
XLisp-Stat
/
Functions
/
identifypoint.lsp
< prev
next >
Wrap
Text File
|
1990-10-11
|
790b
|
23 lines
; book pp.276-277
(send graph-proto :add-mouse-mode 'identify
:title "Identify"
:click :do-identify
:cursor 'finger)
(defmeth graph-proto :do-identify (x y m1 m2)
(let* ((cr (send self :click-range))
(p (first (send self :points-in-rect
(- x (round (/ (first cr) 2)))
(- y (round (/ (second cr) 2)))
(first cr)
(second cr)))))
(if p
(let ((mode (send self :draw-mode))
(label (send self :point-label p)))
(send self :draw-mode 'xor)
(send self :draw-string label x y)
(send self :while-button-down #'(lambda (x y) nil))
(send self :draw-string label x y)
(send self :draw-mode mode)))))